package com.zff.rental.utils.specification;

import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Path;
import jakarta.persistence.criteria.Predicate;

/**
 * @author HCY
 */
public class NotEqualPre<Root, PathV> extends BasePre<Root, PathV, Object> {
    public NotEqualPre(String name, Object params) {
        super(name, params);
    }

    @Override
    protected Predicate generate(CriteriaBuilder cb, Path<PathV> path, Object[] params) {
        return cb.notEqual(path, params[0]);
    }
}
